package com.holyant.report.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Objects;

/**
 * 渠道客户动态dto
 * 
 * @author fkmalls
 * @date 2022-01-17
 */
@Data
@Builder
@ApiModel("渠道客户动态")
@NoArgsConstructor
@AllArgsConstructor
public class RptCustomerChannelDto extends BaseDto {

    private static final long serialVersionUID = 1L;

    private Long relId;
    private String relCode;
    @ApiModelProperty(value = "品牌ID")
    private Long brandId;
    @ApiModelProperty(value = "品牌名称")
    private String brandName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "下单时间")
    private LocalDateTime orderDate;
    @ApiModelProperty(value = "渠道属性")
    private Integer channelAttr;
    private Long customerId;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RptCustomerChannelDto that = (RptCustomerChannelDto) o;
        return Objects.equals(brandId, that.brandId) && Objects.equals(channelAttr, that.channelAttr) && Objects.equals(customerId, that.customerId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(brandId, channelAttr, customerId);
    }
}
